﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PocketApplicationsMVC.Views;

namespace PocketApplicationsMVC.Views
{
    public partial class MenuForm : Form, IMenuView
    {
        public MenuForm()
        {
            InitializeComponent();
        }

        #region IMenuView Members

        public void UpdateText(string text)
        {
            sbStatus.Text = text;
        }

        public event EventHandler<PocketApplicationArgs> SelectedApplication;

        public event EventHandler Exit;

        #endregion

        private void menuItem1_Click(object sender, EventArgs e)
        {
            if (this.Exit != null)
            {
                this.Exit(this, null);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.SelectedApplication != null)
            {
                this.SelectedApplication(this, 
                    new PocketApplicationArgs(EnumApplication.Blog));
            }
        }

        private void btnBoxNet_Click(object sender, EventArgs e)
        {
            if (this.SelectedApplication != null)
            {
                this.SelectedApplication(this,
                    new PocketApplicationArgs(EnumApplication.BoxNet));
            }
        }
    }
}